/*
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-08-28 10:41:37
 * @LastEditTime: 2019-09-09 11:40:22
 * @LastEditors: Please set LastEditors
 */
import React from 'react';
import ReactDOM from 'react-dom';
// import App from './App';

import Page from "./content.App"
// import { createStore,applyMiddleware } from "redux";
// import {Provider} from "react-redux"
// 引入自己的redux
import {createStore} from "./redux/self_redux"
// import reducers from "./redux/combinreducer"
import { compute } from "./redux/reducer"
// 引入自己的 react-redux
import { Provider } from "./self-react-redux"
import App from "./App"
// import thunk from "redux-thunk"
// console.log(reducers)
// import from ""
// createStore 的参数  reducer 初始化的值 intialState 中间件 applyMiddlesex
// let initStore = {
//     number:0
// }
const store = createStore(
    compute
)

ReactDOM.render(
    <Provider store={store}>
        <App></App>
    </Provider>,
    document.getElementById("root")
)
// store.subscribe(()=>{
//     console.log("监听",store.getState())

//     return store.getState()
// });


// store.dispatch({
//     type:"SUBTRACTION"
// })

// store.dispatch({
//     type:"ADDITION"
// })
// store.dispatch({
//     type:"SUBTRACTION"
// })
// store.dispatch({
//     type:"SUBTRACTION"
// })

// ReactDOM.render(
// <Provider store={store}>
// <App data-id="app" />
// </Provider>


// , document.getElementById('root'));

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
// serviceWorker.unregister();
